3.101 \(\int \frac{(g+h x)^3 (d+e x+f x^2)}{\sqrt{a+c x^2}} \, dx\)

Optimal. Leaf size=325 \[ \frac{\sqrt{a+c x^2} \left (4 \left (16 a^2 f h^4-4 a c h^2 \left (5 h (d h+3 e g)+13 f g^2\right )-c^2 g^2 \left (3 f g^2-5 h (16 d h+3 e g)\right )\right )-c h x \left (a h^2 (45 e h+71 f g)+2 c g \left (3 f g^2-5 h (10 d h+3 e g)\right )\right )\right )}{120 c^3 h}+\frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) \left (3 a^2 h^2 (e h+3 f g)-4 a c g \left (3 h (d h+e g)+f g^2\right )+8 c^2 d g^3\right )}{8 c^{5/2}}+\frac{\sqrt{a+c x^2} (g+h x)^2 \left (4 h^2 (5 c d-4 a f)-3 c g (f g-5 e h)\right )}{60 c^2 h}-\frac{\sqrt{a+c x^2} (g+h x)^3 (f g-5 e h)}{20 c h}+\frac{f \sqrt{a+c x^2} (g+h x)^4}{5 c h} \]

[Out]

((4*(5*c*d - 4*a*f)*h^2 - 3*c*g*(f*g - 5*e*h))*(g + h*x)^2*Sqrt[a + c*x^2])/(60*c^2*h) - ((f*g - 5*e*h)*(g + h
*x)^3*Sqrt[a + c*x^2])/(20*c*h) + (f*(g + h*x)^4*Sqrt[a + c*x^2])/(5*c*h) + ((4*(16*a^2*f*h^4 - 4*a*c*h^2*(13*
f*g^2 + 5*h*(3*e*g + d*h)) - c^2*g^2*(3*f*g^2 - 5*h*(3*e*g + 16*d*h))) - c*h*(a*h^2*(71*f*g + 45*e*h) + 2*c*g*
(3*f*g^2 - 5*h*(3*e*g + 10*d*h)))*x)*Sqrt[a + c*x^2])/(120*c^3*h) + ((8*c^2*d*g^3 + 3*a^2*h^2*(3*f*g + e*h) -
4*a*c*g*(f*g^2 + 3*h*(e*g + d*h)))*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(8*c^(5/2))

________________________________________________________________________________________

Rubi [A]  time = 0.664388, antiderivative size = 323, normalized size of antiderivative = 0.99, number of steps used = 6, number of rules used = 5, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.172, Rules used = {1654, 833, 780, 217, 206} \[ \frac{\sqrt{a+c x^2} \left (4 \left (16 a^2 f h^4-4 a c h^2 \left (5 h (d h+3 e g)+13 f g^2\right )-c^2 g^2 \left (3 f g^2-5 h (16 d h+3 e g)\right )\right )-c h x \left (a h^2 (45 e h+71 f g)-10 c g h (10 d h+3 e g)+6 c f g^3\right )\right )}{120 c^3 h}+\frac{\tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right ) \left (3 a^2 h^2 (e h+3 f g)-4 a c g \left (3 h (d h+e g)+f g^2\right )+8 c^2 d g^3\right )}{8 c^{5/2}}+\frac{\sqrt{a+c x^2} (g+h x)^2 \left (4 h^2 (5 c d-4 a f)-3 c g (f g-5 e h)\right )}{60 c^2 h}-\frac{\sqrt{a+c x^2} (g+h x)^3 (f g-5 e h)}{20 c h}+\frac{f \sqrt{a+c x^2} (g+h x)^4}{5 c h} \]

Antiderivative was successfully verified.

[In]

Int[((g + h*x)^3*(d + e*x + f*x^2))/Sqrt[a + c*x^2],x]

[Out]

((4*(5*c*d - 4*a*f)*h^2 - 3*c*g*(f*g - 5*e*h))*(g + h*x)^2*Sqrt[a + c*x^2])/(60*c^2*h) - ((f*g - 5*e*h)*(g + h
*x)^3*Sqrt[a + c*x^2])/(20*c*h) + (f*(g + h*x)^4*Sqrt[a + c*x^2])/(5*c*h) + ((4*(16*a^2*f*h^4 - 4*a*c*h^2*(13*
f*g^2 + 5*h*(3*e*g + d*h)) - c^2*g^2*(3*f*g^2 - 5*h*(3*e*g + 16*d*h))) - c*h*(6*c*f*g^3 - 10*c*g*h*(3*e*g + 10
*d*h) + a*h^2*(71*f*g + 45*e*h))*x)*Sqrt[a + c*x^2])/(120*c^3*h) + ((8*c^2*d*g^3 + 3*a^2*h^2*(3*f*g + e*h) - 4
*a*c*g*(f*g^2 + 3*h*(e*g + d*h)))*ArcTanh[(Sqrt[c]*x)/Sqrt[a + c*x^2]])/(8*c^(5/2))

Rule 1654

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], f = Coeff
[Pq, x, Expon[Pq, x]]}, Simp[(f*(d + e*x)^(m + q - 1)*(a + c*x^2)^(p + 1))/(c*e^(q - 1)*(m + q + 2*p + 1)), x]
 + Dist[1/(c*e^q*(m + q + 2*p + 1)), Int[(d + e*x)^m*(a + c*x^2)^p*ExpandToSum[c*e^q*(m + q + 2*p + 1)*Pq - c*
f*(m + q + 2*p + 1)*(d + e*x)^q - f*(d + e*x)^(q - 2)*(a*e^2*(m + q - 1) - c*d^2*(m + q + 2*p + 1) - 2*c*d*e*(
m + q + p)*x), x], x], x] /; GtQ[q, 1] && NeQ[m + q + 2*p + 1, 0]] /; FreeQ[{a, c, d, e, m, p}, x] && PolyQ[Pq
, x] && NeQ[c*d^2 + a*e^2, 0] &&  !(EqQ[d, 0] && True) &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[
p] || ILtQ[p + 1/2, 0]))

Rule 833

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(g*(d + e*x)
^m*(a + c*x^2)^(p + 1))/(c*(m + 2*p + 2)), x] + Dist[1/(c*(m + 2*p + 2)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^p*
Simp[c*d*f*(m + 2*p + 2) - a*e*g*m + c*(e*f*(m + 2*p + 2) + d*g*m)*x, x], x], x] /; FreeQ[{a, c, d, e, f, g, p
}, x] && NeQ[c*d^2 + a*e^2, 0] && GtQ[m, 0] && NeQ[m + 2*p + 2, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ
[2*m, 2*p]) &&  !(IGtQ[m, 0] && EqQ[f, 0])

Rule 780

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(((e*f + d*g)*(2*p
 + 3) + 2*e*g*(p + 1)*x)*(a + c*x^2)^(p + 1))/(2*c*(p + 1)*(2*p + 3)), x] - Dist[(a*e*g - c*d*f*(2*p + 3))/(c*
(2*p + 3)), Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, p}, x] &&  !LeQ[p, -1]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(g+h x)^3 \left (d+e x+f x^2\right )}{\sqrt{a+c x^2}} \, dx &=\frac{f (g+h x)^4 \sqrt{a+c x^2}}{5 c h}+\frac{\int \frac{(g+h x)^3 \left ((5 c d-4 a f) h^2-c h (f g-5 e h) x\right )}{\sqrt{a+c x^2}} \, dx}{5 c h^2}\\ &=-\frac{(f g-5 e h) (g+h x)^3 \sqrt{a+c x^2}}{20 c h}+\frac{f (g+h x)^4 \sqrt{a+c x^2}}{5 c h}+\frac{\int \frac{(g+h x)^2 \left (c h^2 (20 c d g-13 a f g-15 a e h)+c h \left (4 (5 c d-4 a f) h^2-3 c g (f g-5 e h)\right ) x\right )}{\sqrt{a+c x^2}} \, dx}{20 c^2 h^2}\\ &=\frac{\left (4 (5 c d-4 a f) h^2-3 c g (f g-5 e h)\right ) (g+h x)^2 \sqrt{a+c x^2}}{60 c^2 h}-\frac{(f g-5 e h) (g+h x)^3 \sqrt{a+c x^2}}{20 c h}+\frac{f (g+h x)^4 \sqrt{a+c x^2}}{5 c h}+\frac{\int \frac{(g+h x) \left (c h^2 \left (60 c^2 d g^2+32 a^2 f h^2-a c \left (33 f g^2+5 h (15 e g+8 d h)\right )\right )-c^2 h \left (6 c f g^3-10 c g h (3 e g+10 d h)+a h^2 (71 f g+45 e h)\right ) x\right )}{\sqrt{a+c x^2}} \, dx}{60 c^3 h^2}\\ &=\frac{\left (4 (5 c d-4 a f) h^2-3 c g (f g-5 e h)\right ) (g+h x)^2 \sqrt{a+c x^2}}{60 c^2 h}-\frac{(f g-5 e h) (g+h x)^3 \sqrt{a+c x^2}}{20 c h}+\frac{f (g+h x)^4 \sqrt{a+c x^2}}{5 c h}+\frac{\left (4 \left (16 a^2 f h^4-4 a c h^2 \left (13 f g^2+5 h (3 e g+d h)\right )-c^2 g^2 \left (3 f g^2-5 h (3 e g+16 d h)\right )\right )-c h \left (6 c f g^3-10 c g h (3 e g+10 d h)+a h^2 (71 f g+45 e h)\right ) x\right ) \sqrt{a+c x^2}}{120 c^3 h}+\frac{\left (8 c^2 d g^3+3 a^2 h^2 (3 f g+e h)-4 a c g \left (f g^2+3 h (e g+d h)\right )\right ) \int \frac{1}{\sqrt{a+c x^2}} \, dx}{8 c^2}\\ &=\frac{\left (4 (5 c d-4 a f) h^2-3 c g (f g-5 e h)\right ) (g+h x)^2 \sqrt{a+c x^2}}{60 c^2 h}-\frac{(f g-5 e h) (g+h x)^3 \sqrt{a+c x^2}}{20 c h}+\frac{f (g+h x)^4 \sqrt{a+c x^2}}{5 c h}+\frac{\left (4 \left (16 a^2 f h^4-4 a c h^2 \left (13 f g^2+5 h (3 e g+d h)\right )-c^2 g^2 \left (3 f g^2-5 h (3 e g+16 d h)\right )\right )-c h \left (6 c f g^3-10 c g h (3 e g+10 d h)+a h^2 (71 f g+45 e h)\right ) x\right ) \sqrt{a+c x^2}}{120 c^3 h}+\frac{\left (8 c^2 d g^3+3 a^2 h^2 (3 f g+e h)-4 a c g \left (f g^2+3 h (e g+d h)\right )\right ) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{a+c x^2}}\right )}{8 c^2}\\ &=\frac{\left (4 (5 c d-4 a f) h^2-3 c g (f g-5 e h)\right ) (g+h x)^2 \sqrt{a+c x^2}}{60 c^2 h}-\frac{(f g-5 e h) (g+h x)^3 \sqrt{a+c x^2}}{20 c h}+\frac{f (g+h x)^4 \sqrt{a+c x^2}}{5 c h}+\frac{\left (4 \left (16 a^2 f h^4-4 a c h^2 \left (13 f g^2+5 h (3 e g+d h)\right )-c^2 g^2 \left (3 f g^2-5 h (3 e g+16 d h)\right )\right )-c h \left (6 c f g^3-10 c g h (3 e g+10 d h)+a h^2 (71 f g+45 e h)\right ) x\right ) \sqrt{a+c x^2}}{120 c^3 h}+\frac{\left (8 c^2 d g^3+3 a^2 h^2 (3 f g+e h)-4 a c g \left (f g^2+3 h (e g+d h)\right )\right ) \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a+c x^2}}\right )}{8 c^{5/2}}\\ \end{align*}

Mathematica [A]  time = 0.393918, size = 252, normalized size = 0.78 \[ \frac{\sqrt{a+c x^2} \left (8 \left (8 a^2 f h^3-10 a c h \left (h (d h+3 e g)+3 f g^2\right )+15 c^2 g^2 (3 d h+e g)\right )+8 c h x^2 \left (5 c \left (h (d h+3 e g)+3 f g^2\right )-4 a f h^2\right )+15 c x \left (4 c \left (3 g h (d h+e g)+f g^3\right )-3 a h^2 (e h+3 f g)\right )+30 c^2 h^2 x^3 (e h+3 f g)+24 c^2 f h^3 x^4\right )+15 \sqrt{c} \log \left (\sqrt{c} \sqrt{a+c x^2}+c x\right ) \left (3 a^2 h^2 (e h+3 f g)-4 a c g \left (3 h (d h+e g)+f g^2\right )+8 c^2 d g^3\right )}{120 c^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((g + h*x)^3*(d + e*x + f*x^2))/Sqrt[a + c*x^2],x]

[Out]

(Sqrt[a + c*x^2]*(8*(8*a^2*f*h^3 + 15*c^2*g^2*(e*g + 3*d*h) - 10*a*c*h*(3*f*g^2 + h*(3*e*g + d*h))) + 15*c*(-3
*a*h^2*(3*f*g + e*h) + 4*c*(f*g^3 + 3*g*h*(e*g + d*h)))*x + 8*c*h*(-4*a*f*h^2 + 5*c*(3*f*g^2 + h*(3*e*g + d*h)
))*x^2 + 30*c^2*h^2*(3*f*g + e*h)*x^3 + 24*c^2*f*h^3*x^4) + 15*Sqrt[c]*(8*c^2*d*g^3 + 3*a^2*h^2*(3*f*g + e*h)
- 4*a*c*g*(f*g^2 + 3*h*(e*g + d*h)))*Log[c*x + Sqrt[c]*Sqrt[a + c*x^2]])/(120*c^3)

________________________________________________________________________________________

Maple [A]  time = 0.062, size = 528, normalized size = 1.6 \begin{align*}{\frac{{h}^{3}f{x}^{4}}{5\,c}\sqrt{c{x}^{2}+a}}-{\frac{4\,a{h}^{3}f{x}^{2}}{15\,{c}^{2}}\sqrt{c{x}^{2}+a}}+{\frac{8\,{a}^{2}f{h}^{3}}{15\,{c}^{3}}\sqrt{c{x}^{2}+a}}+{\frac{{x}^{3}{h}^{3}e}{4\,c}\sqrt{c{x}^{2}+a}}+{\frac{3\,{x}^{3}g{h}^{2}f}{4\,c}\sqrt{c{x}^{2}+a}}-{\frac{3\,ax{h}^{3}e}{8\,{c}^{2}}\sqrt{c{x}^{2}+a}}-{\frac{9\,axg{h}^{2}f}{8\,{c}^{2}}\sqrt{c{x}^{2}+a}}+{\frac{3\,{a}^{2}e{h}^{3}}{8}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{5}{2}}}}+{\frac{9\,{a}^{2}g{h}^{2}f}{8}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{5}{2}}}}+{\frac{{x}^{2}{h}^{3}d}{3\,c}\sqrt{c{x}^{2}+a}}+{\frac{{x}^{2}g{h}^{2}e}{c}\sqrt{c{x}^{2}+a}}+{\frac{{g}^{2}{x}^{2}hf}{c}\sqrt{c{x}^{2}+a}}-{\frac{2\,a{h}^{3}d}{3\,{c}^{2}}\sqrt{c{x}^{2}+a}}-2\,{\frac{a\sqrt{c{x}^{2}+a}g{h}^{2}e}{{c}^{2}}}-2\,{\frac{a\sqrt{c{x}^{2}+a}{g}^{2}hf}{{c}^{2}}}+{\frac{3\,gx{h}^{2}d}{2\,c}\sqrt{c{x}^{2}+a}}+{\frac{3\,x{g}^{2}he}{2\,c}\sqrt{c{x}^{2}+a}}+{\frac{x{g}^{3}f}{2\,c}\sqrt{c{x}^{2}+a}}-{\frac{3\,ag{h}^{2}d}{2}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}-{\frac{3\,a{g}^{2}he}{2}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}-{\frac{a{g}^{3}f}{2}\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){c}^{-{\frac{3}{2}}}}+3\,{\frac{\sqrt{c{x}^{2}+a}{g}^{2}hd}{c}}+{\frac{{g}^{3}e}{c}\sqrt{c{x}^{2}+a}}+{{g}^{3}d\ln \left ( x\sqrt{c}+\sqrt{c{x}^{2}+a} \right ){\frac{1}{\sqrt{c}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)^3*(f*x^2+e*x+d)/(c*x^2+a)^(1/2),x)

[Out]

1/5*h^3*f*x^4/c*(c*x^2+a)^(1/2)-4/15*h^3*f*a/c^2*x^2*(c*x^2+a)^(1/2)+8/15*h^3*f*a^2/c^3*(c*x^2+a)^(1/2)+1/4*x^
3/c*(c*x^2+a)^(1/2)*h^3*e+3/4*x^3/c*(c*x^2+a)^(1/2)*g*h^2*f-3/8*a/c^2*x*(c*x^2+a)^(1/2)*h^3*e-9/8*a/c^2*x*(c*x
^2+a)^(1/2)*g*h^2*f+3/8*a^2/c^(5/2)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))*h^3*e+9/8*a^2/c^(5/2)*ln(x*c^(1/2)+(c*x^2+a)
^(1/2))*g*h^2*f+1/3*x^2/c*(c*x^2+a)^(1/2)*h^3*d+x^2/c*(c*x^2+a)^(1/2)*g*h^2*e+x^2/c*(c*x^2+a)^(1/2)*g^2*h*f-2/
3*a/c^2*(c*x^2+a)^(1/2)*h^3*d-2*a/c^2*(c*x^2+a)^(1/2)*g*h^2*e-2*a/c^2*(c*x^2+a)^(1/2)*g^2*h*f+3/2*x/c*(c*x^2+a
)^(1/2)*g*h^2*d+3/2*x/c*(c*x^2+a)^(1/2)*g^2*h*e+1/2*x/c*(c*x^2+a)^(1/2)*g^3*f-3/2*a/c^(3/2)*ln(x*c^(1/2)+(c*x^
2+a)^(1/2))*g*h^2*d-3/2*a/c^(3/2)*ln(x*c^(1/2)+(c*x^2+a)^(1/2))*g^2*h*e-1/2*a/c^(3/2)*ln(x*c^(1/2)+(c*x^2+a)^(
1/2))*g^3*f+3/c*(c*x^2+a)^(1/2)*g^2*h*d+1/c*(c*x^2+a)^(1/2)*g^3*e+g^3*d*ln(x*c^(1/2)+(c*x^2+a)^(1/2))/c^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^3*(f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.08434, size = 1284, normalized size = 3.95 \begin{align*} \left [-\frac{15 \,{\left (12 \, a c e g^{2} h - 3 \, a^{2} e h^{3} - 4 \,{\left (2 \, c^{2} d - a c f\right )} g^{3} + 3 \,{\left (4 \, a c d - 3 \, a^{2} f\right )} g h^{2}\right )} \sqrt{c} \log \left (-2 \, c x^{2} - 2 \, \sqrt{c x^{2} + a} \sqrt{c} x - a\right ) - 2 \,{\left (24 \, c^{2} f h^{3} x^{4} + 120 \, c^{2} e g^{3} - 240 \, a c e g h^{2} + 120 \,{\left (3 \, c^{2} d - 2 \, a c f\right )} g^{2} h - 16 \,{\left (5 \, a c d - 4 \, a^{2} f\right )} h^{3} + 30 \,{\left (3 \, c^{2} f g h^{2} + c^{2} e h^{3}\right )} x^{3} + 8 \,{\left (15 \, c^{2} f g^{2} h + 15 \, c^{2} e g h^{2} +{\left (5 \, c^{2} d - 4 \, a c f\right )} h^{3}\right )} x^{2} + 15 \,{\left (4 \, c^{2} f g^{3} + 12 \, c^{2} e g^{2} h - 3 \, a c e h^{3} + 3 \,{\left (4 \, c^{2} d - 3 \, a c f\right )} g h^{2}\right )} x\right )} \sqrt{c x^{2} + a}}{240 \, c^{3}}, \frac{15 \,{\left (12 \, a c e g^{2} h - 3 \, a^{2} e h^{3} - 4 \,{\left (2 \, c^{2} d - a c f\right )} g^{3} + 3 \,{\left (4 \, a c d - 3 \, a^{2} f\right )} g h^{2}\right )} \sqrt{-c} \arctan \left (\frac{\sqrt{-c} x}{\sqrt{c x^{2} + a}}\right ) +{\left (24 \, c^{2} f h^{3} x^{4} + 120 \, c^{2} e g^{3} - 240 \, a c e g h^{2} + 120 \,{\left (3 \, c^{2} d - 2 \, a c f\right )} g^{2} h - 16 \,{\left (5 \, a c d - 4 \, a^{2} f\right )} h^{3} + 30 \,{\left (3 \, c^{2} f g h^{2} + c^{2} e h^{3}\right )} x^{3} + 8 \,{\left (15 \, c^{2} f g^{2} h + 15 \, c^{2} e g h^{2} +{\left (5 \, c^{2} d - 4 \, a c f\right )} h^{3}\right )} x^{2} + 15 \,{\left (4 \, c^{2} f g^{3} + 12 \, c^{2} e g^{2} h - 3 \, a c e h^{3} + 3 \,{\left (4 \, c^{2} d - 3 \, a c f\right )} g h^{2}\right )} x\right )} \sqrt{c x^{2} + a}}{120 \, c^{3}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^3*(f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

[-1/240*(15*(12*a*c*e*g^2*h - 3*a^2*e*h^3 - 4*(2*c^2*d - a*c*f)*g^3 + 3*(4*a*c*d - 3*a^2*f)*g*h^2)*sqrt(c)*log
(-2*c*x^2 - 2*sqrt(c*x^2 + a)*sqrt(c)*x - a) - 2*(24*c^2*f*h^3*x^4 + 120*c^2*e*g^3 - 240*a*c*e*g*h^2 + 120*(3*
c^2*d - 2*a*c*f)*g^2*h - 16*(5*a*c*d - 4*a^2*f)*h^3 + 30*(3*c^2*f*g*h^2 + c^2*e*h^3)*x^3 + 8*(15*c^2*f*g^2*h +
 15*c^2*e*g*h^2 + (5*c^2*d - 4*a*c*f)*h^3)*x^2 + 15*(4*c^2*f*g^3 + 12*c^2*e*g^2*h - 3*a*c*e*h^3 + 3*(4*c^2*d -
 3*a*c*f)*g*h^2)*x)*sqrt(c*x^2 + a))/c^3, 1/120*(15*(12*a*c*e*g^2*h - 3*a^2*e*h^3 - 4*(2*c^2*d - a*c*f)*g^3 +
3*(4*a*c*d - 3*a^2*f)*g*h^2)*sqrt(-c)*arctan(sqrt(-c)*x/sqrt(c*x^2 + a)) + (24*c^2*f*h^3*x^4 + 120*c^2*e*g^3 -
 240*a*c*e*g*h^2 + 120*(3*c^2*d - 2*a*c*f)*g^2*h - 16*(5*a*c*d - 4*a^2*f)*h^3 + 30*(3*c^2*f*g*h^2 + c^2*e*h^3)
*x^3 + 8*(15*c^2*f*g^2*h + 15*c^2*e*g*h^2 + (5*c^2*d - 4*a*c*f)*h^3)*x^2 + 15*(4*c^2*f*g^3 + 12*c^2*e*g^2*h -
3*a*c*e*h^3 + 3*(4*c^2*d - 3*a*c*f)*g*h^2)*x)*sqrt(c*x^2 + a))/c^3]

________________________________________________________________________________________

Sympy [A]  time = 19.6929, size = 796, normalized size = 2.45 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)**3*(f*x**2+e*x+d)/(c*x**2+a)**(1/2),x)

[Out]

-3*a**(3/2)*e*h**3*x/(8*c**2*sqrt(1 + c*x**2/a)) - 9*a**(3/2)*f*g*h**2*x/(8*c**2*sqrt(1 + c*x**2/a)) + 3*sqrt(
a)*d*g*h**2*x*sqrt(1 + c*x**2/a)/(2*c) + 3*sqrt(a)*e*g**2*h*x*sqrt(1 + c*x**2/a)/(2*c) - sqrt(a)*e*h**3*x**3/(
8*c*sqrt(1 + c*x**2/a)) + sqrt(a)*f*g**3*x*sqrt(1 + c*x**2/a)/(2*c) - 3*sqrt(a)*f*g*h**2*x**3/(8*c*sqrt(1 + c*
x**2/a)) + 3*a**2*e*h**3*asinh(sqrt(c)*x/sqrt(a))/(8*c**(5/2)) + 9*a**2*f*g*h**2*asinh(sqrt(c)*x/sqrt(a))/(8*c
**(5/2)) - 3*a*d*g*h**2*asinh(sqrt(c)*x/sqrt(a))/(2*c**(3/2)) - 3*a*e*g**2*h*asinh(sqrt(c)*x/sqrt(a))/(2*c**(3
/2)) - a*f*g**3*asinh(sqrt(c)*x/sqrt(a))/(2*c**(3/2)) + d*g**3*Piecewise((sqrt(-a/c)*asin(x*sqrt(-c/a))/sqrt(a
), (a > 0) & (c < 0)), (sqrt(a/c)*asinh(x*sqrt(c/a))/sqrt(a), (a > 0) & (c > 0)), (sqrt(-a/c)*acosh(x*sqrt(-c/
a))/sqrt(-a), (c > 0) & (a < 0))) + 3*d*g**2*h*Piecewise((x**2/(2*sqrt(a)), Eq(c, 0)), (sqrt(a + c*x**2)/c, Tr
ue)) + d*h**3*Piecewise((-2*a*sqrt(a + c*x**2)/(3*c**2) + x**2*sqrt(a + c*x**2)/(3*c), Ne(c, 0)), (x**4/(4*sqr
t(a)), True)) + e*g**3*Piecewise((x**2/(2*sqrt(a)), Eq(c, 0)), (sqrt(a + c*x**2)/c, True)) + 3*e*g*h**2*Piecew
ise((-2*a*sqrt(a + c*x**2)/(3*c**2) + x**2*sqrt(a + c*x**2)/(3*c), Ne(c, 0)), (x**4/(4*sqrt(a)), True)) + 3*f*
g**2*h*Piecewise((-2*a*sqrt(a + c*x**2)/(3*c**2) + x**2*sqrt(a + c*x**2)/(3*c), Ne(c, 0)), (x**4/(4*sqrt(a)),
True)) + f*h**3*Piecewise((8*a**2*sqrt(a + c*x**2)/(15*c**3) - 4*a*x**2*sqrt(a + c*x**2)/(15*c**2) + x**4*sqrt
(a + c*x**2)/(5*c), Ne(c, 0)), (x**6/(6*sqrt(a)), True)) + e*h**3*x**5/(4*sqrt(a)*sqrt(1 + c*x**2/a)) + 3*f*g*
h**2*x**5/(4*sqrt(a)*sqrt(1 + c*x**2/a))

________________________________________________________________________________________

Giac [A]  time = 1.17259, size = 424, normalized size = 1.3 \begin{align*} \frac{1}{120} \, \sqrt{c x^{2} + a}{\left ({\left (2 \,{\left (3 \,{\left (\frac{4 \, f h^{3} x}{c} + \frac{5 \,{\left (3 \, c^{4} f g h^{2} + c^{4} h^{3} e\right )}}{c^{5}}\right )} x + \frac{4 \,{\left (15 \, c^{4} f g^{2} h + 5 \, c^{4} d h^{3} - 4 \, a c^{3} f h^{3} + 15 \, c^{4} g h^{2} e\right )}}{c^{5}}\right )} x + \frac{15 \,{\left (4 \, c^{4} f g^{3} + 12 \, c^{4} d g h^{2} - 9 \, a c^{3} f g h^{2} + 12 \, c^{4} g^{2} h e - 3 \, a c^{3} h^{3} e\right )}}{c^{5}}\right )} x + \frac{8 \,{\left (45 \, c^{4} d g^{2} h - 30 \, a c^{3} f g^{2} h - 10 \, a c^{3} d h^{3} + 8 \, a^{2} c^{2} f h^{3} + 15 \, c^{4} g^{3} e - 30 \, a c^{3} g h^{2} e\right )}}{c^{5}}\right )} - \frac{{\left (8 \, c^{2} d g^{3} - 4 \, a c f g^{3} - 12 \, a c d g h^{2} + 9 \, a^{2} f g h^{2} - 12 \, a c g^{2} h e + 3 \, a^{2} h^{3} e\right )} \log \left ({\left | -\sqrt{c} x + \sqrt{c x^{2} + a} \right |}\right )}{8 \, c^{\frac{5}{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^3*(f*x^2+e*x+d)/(c*x^2+a)^(1/2),x, algorithm="giac")

[Out]

1/120*sqrt(c*x^2 + a)*((2*(3*(4*f*h^3*x/c + 5*(3*c^4*f*g*h^2 + c^4*h^3*e)/c^5)*x + 4*(15*c^4*f*g^2*h + 5*c^4*d
*h^3 - 4*a*c^3*f*h^3 + 15*c^4*g*h^2*e)/c^5)*x + 15*(4*c^4*f*g^3 + 12*c^4*d*g*h^2 - 9*a*c^3*f*g*h^2 + 12*c^4*g^
2*h*e - 3*a*c^3*h^3*e)/c^5)*x + 8*(45*c^4*d*g^2*h - 30*a*c^3*f*g^2*h - 10*a*c^3*d*h^3 + 8*a^2*c^2*f*h^3 + 15*c
^4*g^3*e - 30*a*c^3*g*h^2*e)/c^5) - 1/8*(8*c^2*d*g^3 - 4*a*c*f*g^3 - 12*a*c*d*g*h^2 + 9*a^2*f*g*h^2 - 12*a*c*g
^2*h*e + 3*a^2*h^3*e)*log(abs(-sqrt(c)*x + sqrt(c*x^2 + a)))/c^(5/2)